/*
 * @Description: 健康登记和心理评估的表单配置
 * @Autor: Wenmin He
 * @Date: 2021-07-14 14:28:32
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-08-14 17:14:40
 */

import dayjs from "dayjs";
   
// 个人信息
export const investigateInfo = [
  {
    name: '姓名',
    value: '',
    prop: 'name',
  },
  {
    name: '证件类型',
    value: '',
    prop: 'cardType',
  },
  {
    name: '证件号码',
    value: '',
    prop: 'cardId',
  },
  {
    name: '性别',
    value: '',
    prop: 'gender',
  },
  {
    name: '年龄',
    value: '',
    prop: 'age',
  },
  {
    name: '手机号',
    value: '',
    prop: 'telPhone',
  },
]

export const formInfo = [
  {
    title: '巡诊情况',
    subBtn: '健康无异常',
    subBtnValue: 1,
    children: [
      {
        index: '一',
        label: '睡眠状况',
        required: true,
        hasInputFrame: true,
        prop: 'smqk',
        isShowInput: false,
        inputProp: 'smqkqt',
        checkboxArray: [
          {
            text: '正常',
            value: 1,
          },
          {
            value: 2,
            text: '入睡困难',
          },
          {
            value: 3,
            text: '易醒',
          },
          {
            value: 4,
            text: '早醒',
          },
          {
            value: 5,
            text: '其他'
          }
        ],
        inputValue: '',
        value: '',
        type: 'checkbox',
        checkboxValue: [],
        lastCheckboxValue: [], // 上一次的缓存
      },{
        index: '二',
        required: true,
        hasInputFrame: true,
        isShowInput: false,
        prop: 'qxqk',
        inputProp: 'qxqkqt',
        label: '情绪状况',
        checkboxArray: [
          {
            text: '正常',
            value: 1,
          },
          {
            value: 2,
            text: '焦虑烦躁',
          },
          {
            value: 3,
            text: '情绪低落',
          },
          {
            value: 4,
            text: '精神亢奋',
          },
          {
            value: 5,
            text: '其他'
          }
        ],
        inputValue: '',
        value: '',
        type: 'checkbox',
        checkboxValue: [],
        lastCheckboxValue: [], // 上一次的缓存
      },{
        index: '三',
        label: '行为举止',
        hasInputFrame: true,
        isShowInput: false,
        required: true,
        prop: 'yxjz',
        inputProp: 'yxjzqt',
        radioArray: [
          {
            text: '正常',
            value: 1,
          },
          {
            value: 2,
            text: '异常',
          },
        ],
        inputValue: '',
        type: 'radio',
        checkboxValue: [],
        value: '',
        radioValue: '',
      },{
        index: '四',
        label: '自杀倾向',
        required: true,
        prop: 'zsqx',
        inputProp: 'zsqxqt',
        className: 'width100p',
        radioArray: [
          {
            text: '无',
            value: 1,
          },
          {
            value: 2,
            text: '有自杀观念',
          },{
            value: 3,
            text: '有自杀行为',
          },
        ],
        inputValue: '',
        type: 'radio',
        checkboxValue: [],
        value: '',
        radioValue: '',
      },{
        index: '五',
        label: '其他',
        inputValue: '',
        prop: 'xzqkqt',
        type: 'textarea',
        textareaValue: '',
        checkboxValue: [],
        value: '',
        radioValue: '',
      },
    ]
  },
  {
    title: '干预措施',
    children: [
      {
        label: '有无干预措施',
        hasInputFrame: true,
        required: true,
        prop: 'gycs',
        isShowInput: false,
        className: 'col-2',
        inputProp: 'gycsqt',
        checkboxArray: [
          {
            text: '无',
            value: 1,
          },
          {
            text: '加强心理疏导',
            value: 2,
          },
          {
            value: 3,
            text: '邀请精神专科会诊',
          },
          {
            value: 4,
            text: '住院治疗',
          },
          {
            value: 5,
            text: '转居家隔离',
          },
          {
            value: 6,
            text: '其他'
          }
        ],
        inputValue: '',
        value: '',
        type: 'checkbox',
        checkboxValue: [],
        lastCheckboxValue: [], // 上一次的缓存
      }
    ]
  },
  {
    title: '用药情况',
    children: [
      {
        label: '有无用药情况',
        required: true,
        radioArray: [
          {
            text: '有',
            value: 1,
          },
          {
            text: '无',
            value: 0,
          },
          
        ],
        isShowInput: false,
        hasInputFrame: true,
        inputValue: '',
        value: '',
        type: 'radio',
        radioValue: 0,
        prop: 'yyqk',
        inputProp: 'yyqkqt',
        checkboxValue: [],
      }
    ]
  },
  {
    title: '巡诊时间',
    children: [
      {
        label: '巡诊时间',
        required: true,
        dateValue: dayjs().format('YYYY-MM-DD'),
        timeValue: dayjs().format('HH:mm'),
        prop: 'inspectTime',
        value: '',
        type: 'date',
      },
      {
        label: '备注',
        required: false,
        textareaValue: '',
        prop: 'remark',
        type: 'textarea',
      }
    ]
  },
]
